Functions Vs Classes: When To Use Which And Why